#include "Threadable.h"
#include "ThreadMgr.h"
#include "IDMgr.h"
Threadable::Threadable()
{
   t_id = IDMgr::getInstance()->arrangeId();
   ThreadMgr::getinstance()->registerThread(this);
//   std::cout << t_id << std::endl;
}


Threadable::~Threadable()
{


}

void Threadable::activate()
{
    //std::cout << "outer activate " << t_id << std::endl;
    ThreadMgr::getinstance()->activate(t_id);

}


void Threadable::mutex_init(int n)
{
    m_mutexArrPtr = new boost::mutex[n];
}



